home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / comm / www / ALynx.lha / ALynx / goodies / Nudel_MALS.LHA / MosaicSave < prev    next >
AmigaDOS Script File  |  1995-06-05  |  2KB  |  53 lines

  1. .key viewer/a,name/a
  2. .bra {
  3. .ket }
  4.  
  5. ; Quickly written by Leo Davidson (P0T-NOoDLE / Gods'Gift / ATX).
  6. ; If you have any problems, e-mail me "leo@hampschl.demon.co.uk", or
  7. ; look for "Nudel" in #Amiga on IRC.
  8. ;
  9. ; This is a script for AMosaic, ALynx, or anything similar really.
  10. ; It requires the commands "Basename" (there are numerous versions of this),
  11. ;    "requestchoice" & "requestfile" (which come with OS3).
  12. ;
  13. ; The script will OPTIONALLY ask if you want to view the file, and then
  14. ; give you a file-requester with which to save the file.
  15. ;
  16. ;
  17. ; Setup your mailcap like this:
  18. ;
  19. ; type/type; <Path To This Script> <Viewer Command> %s
  20. ;
  21. ; (%s will be replaced by the filename by ALynx/AMosaic)
  22. ; If you set <Viewer Command> to "NOVIEW", you will only
  23. ; be prompted with a filerequester.
  24. ;
  25. ; Make SURE that the "S"cript bit is set on this file!
  26. ;
  27. ; Examples:
  28. ;
  29. ; audio/*; AmiTCP:Tools/MosaicSave DH0:Tools/Music/Utils/DSound %s
  30. ; text/x-aguide; AmiTCP:Tools/MosaicSave "Multiview FONT=P0T-NOoDLE.font FONTSIZE=8 PubScreen=FileViewers" %s
  31. ; application/*; AmiTCP:Tools/MosaicSave NOVIEW %s
  32. ;
  33. ; People using ALynx with the TempDir in RAM may wish to un-comment the last
  34. ; line which deletes the tempfile after saving it to disk. (I don't *think*
  35. ; that ALynx does this automatically, as it buffers everything in case you
  36. ; want to retrace to it).
  37. ;
  38. ; (As they always should be, the instructions are longer than the thing itself :-)
  39.  
  40. failat 21
  41. IF {viewer} NOT EQ "NOVIEW"
  42. ;;;;;;;    IF `requestchoice Title="MosaicSave" Body="View this thing?" Gadgets="YES|NO" PubScreen="Mosaic"` EQ 1
  43.     IF `requestchoice Title="MosaicSave" Body="View this thing?" Gadgets="YES|NO"` EQ 1
  44.         {viewer} >NIL: <NIL: {name}
  45.         ENDIF
  46.     ENDIF
  47. set savename `basename {name}`
  48. ;copy >NIL: {name} to `requestfile Drawer=DLS: File=$savename title="Save as..." savemode noicons pubscreen=Mosaic`
  49. copy >NIL: {name} to `requestfile Drawer=DLS: File=$savename title="Save as..." savemode noicons`
  50. ; If they cancel the requestor, copy will fail, but will not cause any errors.
  51. unset savename
  52. ;delete >NIL: {name} QUIET
  53.